package com.roy.DubboSpringClient;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.roy.DubboRPCDemo.protocol.MyService;

public class Comsumer {

	public static void main(String[] args) {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("consumer.xml");
        context.start();
        MyService demoService = (MyService)context.getBean("myservice"); // 获取远程服务代理
        String hello = demoService.sayHello("world"); // 执行远程方法
        System.out.println( hello ); // 显示调用结果
	}
}
